package com.lihao.sam.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @ClassName EmpSetting
 * @Description TODO
 * @Author LiHao
 * @Date 2022/11/23 14:39
 * @Version 1.0
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class EmpSetting {
    /** 序号 */
    private Integer id;
    /** 员工编号 */
    private Integer empNo;
    /** 员工姓名 */
    private String empName;
    /** 性别      0男 1女 */
    private Integer gender;
    /** 籍贯 */
    private String nativePlace;
    /** 身份证号 */
    private String IDCard;
    /** 联系电话 */
    private String phone;
    /** 聘用部门 */
    private String department;
    /** 岗位待遇    月薪 */
    private Double salary;
    /** 聘用起始日 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date hireBeginDate;
    /** 离职日 */
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date leaveDate;

    //当添加物业人员信息的时候同步在员工基本资料里添加信息

    public EmpSetting(Integer empNo, String empName, Integer gender, String nativePlace, String IDCard, String phone, String department, Double salary) {
        this.empNo = empNo;
        this.empName = empName;
        this.gender = gender;
        this.nativePlace = nativePlace;
        this.IDCard = IDCard;
        this.phone = phone;
        this.department = department;
        this.salary = salary;
    }

    //当修改物业人员信息的时候同步在员工基本资料里修改信息
    public EmpSetting(Integer id,Integer empNo, String empName, Integer gender) {
        this.id = id;
        this.empNo = empNo;
        this.empName = empName;
        this.gender = gender;
    }
}
